package Service.Impl;

import Bean.Cart;
import Bean.Order;
import Bean.OrderItem;
import Dao.Impl.OrderDaoImpl;
import Dao.OrderDao;
import Service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {
    private OrderDao orderDao = new OrderDaoImpl();
    @Override
    public void insertOrder(Order order) {
        orderDao.insertOrder(order);
    }

    @Override
    public List<Order> getALLOrder(Integer userId) {
        return orderDao.getALLOrder(userId);
    }

    @Override
    public void insertOrderItem(OrderItem orderItem) {
        orderDao.insertOrderItem(orderItem);
    }

    @Override
    public List<OrderItem> getOrderALL(String orderNumber) {
        return orderDao.getOrderALL(orderNumber);
    }

    @Override
    public void updateStatue(String word, Integer userId, String orderNumber, String time) {
        orderDao.updateStatue(word, userId, orderNumber, time);
    }
    public void insertOrderItem(List<Cart.CartGood> list,Order order){

    }
}
